package com.zszedu.mapper;

import com.zszedu.pojo.Income;
import org.apache.ibatis.annotations.Select;

import java.util.Date;
import java.util.List;

public interface IncomeMapper {
    //根据用户id查询收益信息
    List<Income> queryByUid(Long uid);

    //添加收益信息
    void addIncome(Income income);

    //查询收益状态为0，并且收益到账时间小于当前日期的信息
    @Select("select * from b_income_record where income_status = 0 and income_date <= #{date} ")
    List<Income> queryStatusAndDate(Date date);

    //修改收益状态(0:未返 / 1:已返)
    void editStatus(Long id);
}
